<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8" />
    <link rel="stylesheet" href="${ctx}/css/font.css">
    <link rel="stylesheet" href="${ctx}/lib/layui/css/layui.css">
    <link rel="stylesheet" href="${ctx}/css/xadmin.css">
    <script type="text/javascript" src="${ctx}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/xadmin.js"></script>
    <script src="${ctx}/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript">
      layui.use(['form'], function(){
        var layer = layui.layer;
       $(function () {
        $("#deptForm").submit(function(){

          var msg2 = "";
          var msg3 = "";
          var msg4 = "";
          var msg5 = "";

          var obj2=document.getElementsByName("second");
          for(var i=0;i<obj2.length;i++){
            if(obj2[i].checked==true){
              msg2=1;
              break;
            }else{
              msg2=0;
            }
          }

          var obj3=document.getElementsByName("four");
          for(var i=0;i<obj3.length;i++){
            if(obj3[i].checked==true){
              msg3=1;
              break;
            }else{
              msg3=0;
            }
          }

          var obj4=document.getElementsByName("five");
          for(var i=0;i<obj4.length;i++){
            if(obj4[i].checked==true){
              msg4=1;
              break;
            }else{
              msg4=0;
            }
          }

          var obj5=document.getElementsByName("six");
          for(var i=0;i<obj5.length;i++){
            if(obj5[i].checked==true){
              msg5=1;
              break;
            }else{
              msg5=0;
            }
          }
          if (msg2 == 0 || msg3 == 0|| msg4 == 0|| msg5 == 0){
            layer.alert(JSON.stringify("你还没有完成评价，请前往评价！"), {
              title: '警告'
            });
            return false;
          }else{
            return true;
            $("#deptForm").submit();
          }
        });
      });
      });
    </script>
  </head>
  <body>

  <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a>
          <cite>培养方案评价</cite></a>
      </span>
  </div>
  <div class="x-body">
    <blockquote class="layui-elem-quote">
      <span class="x-red">你正在进行专业培养方案评价，请同学客观公正进行评价，学生的信息将会进行保密！</span>
    </blockquote>
    <form class="layui-form" action="${ctx}/programme/result" id="deptForm" method="post">
      <input name="investigationID" value="${id}" hidden="hidden"/>
      <div class="media-body">
        <div class="pad-btm" style="margin-left: 60px;">
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>1.你对本培养方案的满意程度（打分，满分十分）</p>
          <div style="margin-left: 16px;"><div id="test8"></div><input hidden="hidden" id="content" name="star" value="5"></div>
          <br>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>2.你认为哪种风格的培养方案更有利发展?</p>
          <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left:16px;">
              <input type="radio" id="second1" name="second" value="较为固定的课程" title="较为固定的课程"><br>
              <input type="radio" id="second2" name="second" value="完全自由的搭配，自己选修" title="完全自由的搭配，自己选修"><br>
              <input type="radio" id="second3" name="second" value="几个方案以供选择" title="几个方案以供选择"><br>
            </div>
          </div>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>3.你认为本专业培养方案的通识课（多选）?</p>
          <div class="layui-form-item" pane="" >
            <div class="layui-input-block" style="margin-left:16px;">
              <input type="checkbox" name="three1" lay-skin="primary" title="太多了" value="太多了"><br>
              <input type="checkbox" name="three2" lay-skin="primary" title="刚刚好" value="刚刚好"><br>
              <input type="checkbox" name="three3" lay-skin="primary" title="太少了" value="太少了"><br>
              <input type="checkbox" name="three4" lay-skin="primary" title="太水了" value="太水了"><br>
              <input type="checkbox" name="three5" lay-skin="primary" title="有收获" value="有收获"><br>
            </div>
          </div>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>4.你认为你们学校的数理课程比例及难度合理吗？</p>
          <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left:16px;">
              <input lay-filter="id1" type="radio" name="four" value="合理，对专业课的学习打下了良好的基础" title="合理，对专业课的学习打下了良好的基础"><br>
              <input lay-filter="id2" type="radio" name="four" value="不合理，数理课程所占比例过少或者难度过低，导致专业课学习比较吃力" title="不合理，数理课程所占比例过少或者难度过低，导致专业课学习比较吃力"><br>
              <input lay-filter="id3" type="radio" name="four" value="不合理，数理课程所占比例过多或者难度过大，没有必要" title="不合理，数理课程所占比例过多或者难度过大，没有必要"><br>
              <input lay-filter="id4" type="radio" name="four" value="不合理，其他理由（请具体说明）" title="不合理，其他理由（请具体说明）"><br>
              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block" style="margin-left:16px;">
                  <textarea id="id4" name="id4" placeholder="请输入内容" class="layui-textarea" style="width:400px;display: none"></textarea>
                </div>
              </div>
            </div>
          </div>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>5.你认为核心专业课程设置在哪几个学期比较合理?</p>
          <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left:16px;">
              <input type="radio" name="five" value="大二上、下" title="大二上、下"><br>
              <input type="radio" name="five" value="大二下、大三上" title="大二下、大三上"><br>
              <input type="radio" name="five" value="大三上、下" title="大三上、下"><br>
              <input type="radio" name="five" value="大三下、大四上" title="大三下、大四上"><br>
              <input type="radio" name="five" value="穿插于各个学期" title="穿插于各个学期"><br>
            </div>
          </div>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>6.对于本校的专业方向的设置你满意吗？</p>
          <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left:16px;">
              <input lay-filter="id61" type="radio" name="six" value="不是很满意，专业方向过少，没有涵盖到我感兴趣的方面" title="不是很满意，专业方向过少，没有涵盖到我感兴趣的方面"><br>
              <input lay-filter="id62" type="radio" name="six" value="不是很满意，专业方向过多，难以抉择" title="不是很满意，专业方向过多，难以抉择"><br>
              <input lay-filter="id63" type="radio" name="six" value="满意" title="满意"><br>
              <input lay-filter="id64" type="radio" name="six" value="不是很满意，其他理由（请具体说明）" title="不是很满意，其他理由（请具体说明）"><br>
              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block" style="margin-left:16px;">
                  <textarea id="id6" name="id6" placeholder="请输入内容" class="layui-textarea" style="width:400px;display: none"></textarea>
                </div>
              </div>
            </div>
          </div>
          <p class="fontColor" style="font-size: 18px;"><span style="color: red">* &nbsp;</span>7.你认为你校培养方案存在的问题是（多选）?</p>
          <div class="layui-form-item" pane="" >
            <div class="layui-input-block" style="margin-left:16px;">
              <input  lay-filter="id71" type="checkbox" name="seven1" lay-skin="primary" title="课程难度太大" value="课程难度太大"><br>
              <input  lay-filter="id72" type="checkbox" name="seven2" lay-skin="primary" title="核心专业课程时间安排不合理" value="核心专业课程时间安排不合理"><br>
              <input  lay-filter="id73" type="checkbox" name="seven3" lay-skin="primary" title="通识课学分设置不合理" value="通识课学分设置不合理"><br>
              <input  lay-filter="id74" type="checkbox" name="seven4" lay-skin="primary" title="实验实践课程数量不够" value="实验实践课程数量不够"><br>
              <input  lay-filter="id75" type="checkbox" name="seven5" lay-skin="primary" title="专业研究，发展方向有限" value="专业研究，发展方向有限"><br>
            </div>
          </div>
          <br>
        </div>
      </div>
      <button type="submit" class="layui-btn layui-btn-small" style="margin-left: 500px;margin-top: 30px;">提交问卷</button>
    </form>
  </div>
  </table>

  <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
  <script>
    layui.use(['rate'], function(){
      var rate = layui.rate;
      //基础效果
      var ins1 = rate.render({
        elem: '#test8'
        ,length: 10
        ,value: 5 //初始值
        ,text: true
        ,setText: function(value){ //自定义文本的回调
           this.span.text(( value + "分"));
        }
        ,choose: function(value){
          $("#content").val(ins1.config.value);
        }
      });
    });
  </script>
<%--监听点击事件--%>
  <script type="text/javascript">
    layui.use(['form'], function(){
      var form = layui.form;
      form.on("radio(id4)", function () {
        $("#id4").css('display','block');
      });
      form.on("radio(id1)", function () {
        $("#id4").css('display','none');
      });
      form.on("radio(id2)", function () {
        $("#id4").css('display','none');
      });
      form.on("radio(id3)", function () {
        $("#id4").css('display','none');
      });

      form.on("radio(id64)", function () {
        $("#id6").css('display','block');
      });
      form.on("radio(id61)", function () {
        $("#id6").css('display','none');
      });
      form.on("radio(id62)", function () {
        $("#id6").css('display','none');
      });
      form.on("radio(id63)", function () {
        $("#id6").css('display','none');
      });
      //
      // form.on("checkbox(id76)", function () {
      //   $("#id7").css('display','block');
      // });
      // form.on("checkbox(id71)", function () {
      //   $("#id7").css('display','none');
      // });
      // form.on("checkbox(id72)", function () {
      //   $("#id7").css('display','none');
      // });
      // form.on("checkbox(id73)", function () {
      //   $("#id7").css('display','none');
      // });
      // form.on("checkbox(id74)", function () {
      //   $("#id7").css('display','none');
      // });
      // form.on("checkbox(id75)", function () {
      //   $("#id7").css('display','none');
      // });
    })
  </script>

  </body>
</html>